package com.singlemusic.controller;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.singlemusic.utils.AESUtils;
import com.singlemusic.utils.FileUtils;

@Controller
@RequestMapping("/test03")
public class MusicController {
	
	@ResponseBody
	@RequestMapping("/play")
	public List<String> playMusic(@RequestParam("path")String path){
		//FileUtils.loadFile(AESUtils.deCrypt(id), response);
		List<String> list = new ArrayList<String>();
		list.add(AESUtils.deCrypt(path));
		return list;
		
	}
}
